pub mod api;
pub mod commands;
pub mod settings;
pub mod state;

#[cfg(test)]
mod tests {
    use argon2::Argon2;
    use password_hash::{PasswordHash, PasswordVerifier};

    #[test]
    fn it_works() {
        let hash = "$argon2id$v=19$m=19456,t=2,p=1$IeG4/c/CGzqa/kuE1v2i0A$bysRqBgJOXxjWzjgpLC884SV4j524UtgSGdfdQpkD8w";
        let password = "Pa$$wd123";

        let argon2 = Argon2::default();
        let parsed_hash = PasswordHash::new(hash).unwrap();
        let ok = argon2
            .verify_password(password.as_bytes(), &parsed_hash)
            .is_ok();
        assert!(ok);
    }
}
